XML Schema Definition (XSD) data type support

Note  XML features, except for saving files in the XML Spreadsheet format, are available only in Microsoft Office Professional Edition 2003 and Microsoft Office Excel 2003.

How Excel handles XSD data types when importing XML data

The following table lists the display format that is applied when an item with a particular XSD data type is imported into an Excel worksheet. Data with an XSD format listed in the Unsupported Formats column are imported as text values.

XSD Data TypeExcel Display FormatUnsupported Formats
timeh:mm:sshh:mm:ssZ
Hh:mm:ss.f-f
dateTimem/d/yyyy h:mmyyyy-mm-ddThh:mm:ssZ
yyyy-mm-ddThh:mm:ss+/-hh:mm
yyyy-mm-ddThh:mm:ss.f-f
Years outside of the range between 1900 to 9999
dateDate *3/14/2001yyyy-mm-ddZ
yyyy-mm-dd+/-hh:mm
Years outside of the range between 1900 to 9999
gYearNumber, no decimalsyyyy+/-hh:mm
Years outside of the range between 1900 to 9999
gDay
gMonth
Number, no decimals
gYearMonthCustom mmm-yyyyyy-mm+/-hh:mm
Years outside of the range between 1900 to 9999
gMonthDayCustom d-mmm
anytype
anyURI
base64Binary
duration
ENTITIES
ENTITY
hexBinary
ID
IDREF
IDREFS
language
Name
NCName
NMTOKEN
NMTOKENS
normalizedString
NOTATION
QName
string
token
Text
booleanBoolean
decimal
float
double
GeneralLeading and trailing zeros will are dropped.
‘-’ and ‘+’ signs will be respected, although only negative signs will be displayed.
Excel stores and calculates with 15 significant digits of precision.
byte
int
integer
long
negativeInteger
nonNegativeInteger
nonPositiveInteger
positiveInteger
short
unsignedByte
unsignedInt
unsignedLong
unsignedShort
General

How Excel display formats map to XSD data types when exporting XML data

When you export XML data, the exported data will match the data displayed in the worksheet under the following cirsumstances:

If you change the display format of a cell with numeric, date, or time data, then the underlying value of the cell is exported. For example, you apply a Percentage display format to a cell that results in the display of 51.50%. The cell's value will be exported as .515.